package com.origin.grid.framework.modules.search.serviceimpl;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.origin.grid.framework.cache.Cache;
import com.origin.grid.framework.cache.CachePrefix;
import com.origin.grid.framework.common.enums.PromotionTypeEnum;
import com.origin.grid.framework.common.enums.ResultCode;
import com.origin.grid.framework.common.exception.RetryException;
import com.origin.grid.framework.common.exception.ServiceException;
import com.origin.grid.framework.common.properties.RocketmqCustomProperties;
import com.origin.grid.framework.common.vo.PageVO;
import com.origin.grid.framework.modules.goods.entity.dos.GoodsSku;
import com.origin.grid.framework.modules.goods.entity.dto.GoodsParamsDTO;
import com.origin.grid.framework.modules.goods.entity.dto.GoodsSkuDTO;
import com.origin.grid.framework.modules.goods.entity.enums.GoodsAuthEnum;
import com.origin.grid.framework.modules.goods.entity.enums.GoodsSalesModeEnum;
import com.origin.grid.framework.modules.goods.entity.enums.GoodsStatusEnum;
import com.origin.grid.framework.modules.goods.service.BrandService;
import com.origin.grid.framework.modules.goods.service.CategoryService;
import com.origin.grid.framework.modules.goods.service.GoodsSkuService;
import com.origin.grid.framework.modules.goods.service.StoreGoodsLabelService;
import com.origin.grid.framework.modules.promotion.entity.dos.BasePromotions;
import com.origin.grid.framework.modules.promotion.entity.dos.PromotionGoods;
import com.origin.grid.framework.modules.promotion.entity.enums.PromotionsScopeTypeEnum;
import com.origin.grid.framework.modules.promotion.entity.enums.PromotionsStatusEnum;
import com.origin.grid.framework.modules.promotion.service.PromotionGoodsService;
import com.origin.grid.framework.modules.promotion.service.PromotionService;
import com.origin.grid.framework.modules.promotion.tools.PromotionTools;
import com.origin.grid.framework.modules.search.entity.dos.CustomWords;
import com.origin.grid.framework.modules.search.entity.dos.EsGoodsAttribute;
import com.origin.grid.framework.modules.search.entity.dos.EsGoodsIndex;
import com.origin.grid.framework.modules.search.entity.dto.EsGoodsSearchDTO;
import com.origin.grid.framework.modules.search.repository.EsGoodsIndexRepository;
import com.origin.grid.framework.modules.search.service.CustomWordsService;
import com.origin.grid.framework.modules.search.service.EsGoodsIndexService;
import com.origin.grid.framework.modules.search.service.EsGoodsSearchService;
import com.origin.grid.framework.rocketmq.RocketmqSendCallbackBuilder;
import com.origin.grid.framework.rocketmq.tags.GoodsTagsEnum;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.core.RocketMQTemplate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

/**
 * 商品索引业务层实现
 *
 * @author paulG
 * @since 2020/10/14
 **/
@Slf4j
@Service
public class EsGoodsIndexServiceImpl implements EsGoodsIndexService {

    @Override
    public void init() {

    }

    @Override
    public Map<String, Long> getProgress() {
        return null;
    }

    @Override
    public void initIndex() {

    }

    @Override
    public void addIndex(EsGoodsIndex goods) {

    }

    @Override
    public void addIndex(List<EsGoodsIndex> goods) {

    }

    @Override
    public void updateIndex(EsGoodsIndex goods) {

    }

    @Override
    public void updateIndex(String id, EsGoodsIndex goods) {

    }

    @Override
    public void updateIndex(Map<String, Object> queryFields, Map<String, Object> updateFields) {

    }

    @Override
    public void updateBulkIndex(List<EsGoodsIndex> goodsIndices) {

    }

    @Override
    public void deleteIndex(Map<String, Object> queryFields) {

    }

    @Override
    public void deleteIndexById(String id) {

    }

    @Override
    public void deleteIndexByIds(List<String> ids) {

    }

    @Override
    public void initIndex(List<EsGoodsIndex> goodsIndexList, boolean regeneratorIndex) {

    }

    @Override
    public void updateEsGoodsIndexPromotions(String id, BasePromotions promotion, String key) {

    }

    @Override
    public void updateEsGoodsIndexPromotions(List<String> ids, BasePromotions promotion, String key) {

    }

    @Override
    public void updateEsGoodsIndexByList(List<PromotionGoods> promotionGoodsList, BasePromotions promotion, String key) {

    }

    @Override
    public void updateEsGoodsIndexAllByList(BasePromotions promotion, String key) {

    }

    @Override
    public void deleteEsGoodsPromotionByPromotionKey(List<String> skuIds, String promotionsKey) {

    }

    @Override
    public void deleteEsGoodsPromotionByPromotionKey(String promotionsKey) {

    }

    @Override
    public void cleanInvalidPromotion() {

    }

    @Override
    public EsGoodsIndex findById(String id) {
        return null;
    }

    @Override
    public Map<String, Object> getPromotionMap(String id) {
        return null;
    }

    @Override
    public List<String> getPromotionIdByPromotionType(String id, PromotionTypeEnum promotionTypeEnum) {
        return null;
    }

    @Override
    public EsGoodsIndex getResetEsGoodsIndex(GoodsSku goodsSku, List<GoodsParamsDTO> goodsParamDTOS) {
        return null;
    }
}
